<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>知识问答系统-登录</title>
    <link rel="stylesheet" href="/css/bootstrap.css">
    <link rel="stylesheet" href="/styles/all.css">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">知识管理系统</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="/ask">提问</a></li>
                {{if user}}
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{user}}<span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="/user">个人资料</a></li>
                        <li role="separator" class="divider"></li>
                        <li class="quit"><a href="/signout">退出</a></li>
                    </ul>
                </li>
                {{else}}
                <li><a href="/signin">登录</a></li>
                {{/if}}
                <li><a href="/register">注册</a></li>
            </ul>
        </div>
    </div>
</nav>
<div class="container">
    <form action="/user/signin" method="POST">
        <div class="form-group">
            <input type="text" name="petname" class="form-control" required
                   pattern="^[0-9a-zA-Z\u4e00-\u9fa5]{2,16}$" placeholder="请输入昵称">
        </div>
        <div class="form-group">
            <input type="password" name="password" class="form-control"
                   pattern="^.{6,16}$" required placeholder="请输入密码">
        </div>
        <input type="submit" class="btn btn-success form-control" value="登录"></input>
    </form>
</div>
<div class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
                    <h4 class="modal-title">知识管理系统</h4>
                </div>
                <div class="modal-body"></div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">确定</button>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.js"></script>
<script src="/js/jquery.cookie.js"></script>
<script src="/scripts/signin.js"></script>